/* 
 * File:   Animation.hpp
 * Author: jcdenton
 *
 * Created on July 2, 2010, 2:34 PM
 */

#ifndef _ANIMATION_HPP
#define	_ANIMATION_HPP

#include <SFML/Graphics.hpp>
#include <vector>
#include <string>

class Animation {
public:
    Animation(const std::string& path = "", int = 16, int = 16,
            bool = true, int = 60);
    virtual ~Animation();
    const sf::Sprite& getFrame();
private:
    void nextFrame();
    sf::Image& loadBase(const std::string&);
    void loadAnimation(sf::Image&);
private:
    int _frameIndex;
    int _frameMax;
    int _frameWidth;
    int _frameHeight;
    int _animationSleep;
    bool _isInfinite;
    sf::Sprite* _currentFrame;
    std::vector<sf::Image*>* _framesVector;
};

#endif	/* _ANIMATION_HPP */

